import { apiHost, amapHost, appSecret } from '@/config'
import HttpService from '@/apis/creator'

const http = new HttpService({
  appSecret,
  config: {
    baseURL: apiHost,
    amapURL: amapHost
  }
})

export { http }

export default {
  checkLoginStatus (body) {
    return http.service('/api/user/checkLoginStatus', body)
  },
	getCode (body) {
	  return http.service('/api/user/getCode', body)
	},
	login (body) {
	  return http.service('/api/user/login', body)
	},
	alipayLogin (body) {
	  return http.service('/api/user/authBaseAliLogin', body)
	},
	wechatBindPhone (body) {
	  return http.service('/api/user/mobileLiteAppDecrypt', body)
	},
	alipayBindPhone (body) {
	  return http.service('/api/AlipayMini/bindPhone', body)
	},
	getUserInfo (body) {
	  return http.service('/api/user/getUserInfo', body)
	},
	getBalanceInfo (body) {
	  return http.service('/api/wallet/getBalanceInfo', body)
	},
	getAllCityList (body) {
	  return http.service('/v1/common/getAllCityList', body)
	},
	getSearchCityList (body) {
	  return http.service('/v1/common/searchCityList', body)
	},
	getBannerBatch (body) {
	  return http.service('/api/common/getBannerBatch', body)
	},
	getCityStoreInfo (body) {
		return http.service('/api/xianyu/getCityStoreInfo', body)
	},
	getNearStoreInfo (body) {
		return http.service('/v1/common/getCitySupportType', body)
	},
	getEvaluateHistory (body) {
	  return http.service('/api/product/getEvaluateHistoryTop', body)
	},
	getIndexCardInfo (body) {
	  return http.service('/v5/index/getIndexCardInfo', body)
	},
	getCategoryList (body) {
	  return http.service('/api/product/getCategoryList', body)
	},
	getBrandList (body) {
	  return http.service('/api/product/getBrandList', body)
	},
	getSeriesList (body) {
	  return http.service('/api/product/getSeriesList', body)
	},
	getProductList (body) {
	  return http.service('/api/product/getProductList', body)
	},
	getEvaluateParam (body) {
		return http.service('/api/product/getEvaluateParam', body)
	},
	evaluate (body) {
		return http.service('/api/product/evaluate', body)
	},
	getEvaluateResult (body) {
		return http.service('/api/product/getEvaluateResult', body)
	},
	getSupportRecycleInfo (body) {
		return http.service('/v1/optimize/getSupportRecycleType', body)
	},
	getSfCity (body) {
		return http.service('/api/common/getSfCity', body)
	},
	getServiceTime (body) {
		return http.service('/v1/optimize/getServiceTime', body)
	},
	getAllowCouponList (body) {
		return http.service('/v1/coupon/getAllowCouponList', body)
	},
	getAllowAddressList (body) {
		return http.service('/v1/optimize/getAddressList', body)
	},
	getCityList (body) {
		return http.service('/api/xianyu/getCityList', body)
	},
	getStoreList (body) {
		return http.service('/api/xianyu/getStoreList', body)
	},
	getShareInfo (body) {
		return http.service('/v1/optimize/getShareInfo', body)
	},
	getPriceHistory (body) {
		return http.service('/v1/optimize/getPriceHistory', body)
	},
	getEvaluateSkuResult (body) {
		return http.service('/v1/optimize/getEvaluateSkuResult', body)
	},
	getBulletInfo (body) {
		return http.service('/v1/optimize/getBulletInfo', body)
	},
	getAddressDetail (body) {
		return http.service('/v1/optimize/getAddressDetail', body)
	},
	addAddressByLocation (body) {
		return http.service('/v1/optimize/addAddress', body)
	},
	editAddressByLocation (body) {
		return http.service('/v1/optimize/modAddress', body)
	},
	checkRecycleAddress (body) {
		return http.service('/v1/optimize/checkAddress', body)
	},
	checkCredit (body) {
		return http.service('/v5/zhima/checkCredit', body)
	},
	openCredit (body) {
		return http.service('/v5/zhima/openCredit', body)
	},
	checkCreditStatusByOutNo (body) {
		return http.service('/v5/zhima/checkByOutNo', body)
	},
	createOrder (body) {
		return http.service('/v1/order/placeOrder', body)
	},
	createCreditOrder (body) {
		return http.service('/v5/zhima/placeOrder', body)
	},
	getOrderResult (body) {
		return http.service('/api/order/getOrderResult', body)
	},
	getOrderList (body) {
		return http.service('/v1/order/getOrderList', body)
	},
	getOrderDetail (body) {
		return http.service('/v1/order/getOrderInfo', body)
	},
	getCancelReasonList (body) {
		return http.service('/v1/order/getCancelReasonList', body)
	},
	getExpressCompanyList (body) {
		return http.service('/v1/order/getExpressCompanyList', body)
	},
	getDeliveryAddress (body) {
		return http.service('/api/common/getDeliveryAddress', body)
	},
	updateExpressNumber (body) {
		return http.service('/v1/order/updateExpressNumber', body)
	},
	cancelRecycle (body) {
		return http.service('/v1/order/cancel', body)
	},
	refundGoods (body) {
		return http.service('/v5/order/refund', body)
	},
	agreeRecycle (body) {
		return http.service('/v1/order/agree', body)
	},
	getKeleOauthCode (body) {
		return http.service('/api/user/getOauthCode', body)
	},
	getFeedbackTypeList (body) {
		return http.service('/api/user/getFeedbackTypeList', body)
	},
	submitFeedback (body) {
		return http.service('/api/user/feedback', body)
	},
}